import requests
import json

if '__main__' == __name__:
    xjson = {}
    xjson['list'] = [1, 2, 3, 4, 5, ]
    print('json:', xjson)

    # 获取输出
    try:
        res = requests.post('http://127.0.0.1:7771/sum', json=xjson)

        # 解析输出
        print('res:', res)
        print('res type:', type(res))
        print('res.text:', res.text)
        print('res.text type:', type(res.text))

        xres = json.loads(res.text)
        print('result', xres)
        print('result type:', type(xres))
    except Exception as ex:
        print('Here!')
        print(ex)
        pass
